﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace EntityframeworkDemo.Migrations
{
    public partial class initial : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "User",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    Name = table.Column<string>(maxLength: 256, nullable: true),
                    RealName = table.Column<string>(maxLength: 256, nullable: true),
                    NickName = table.Column<string>(maxLength: 256, nullable: true),
                    Password = table.Column<string>(maxLength: 256, nullable: true),
                    PhoneNumber = table.Column<string>(maxLength: 50, nullable: true),
                    IsPhoneConfirmed = table.Column<bool>(nullable: false),
                    EmailAddress = table.Column<string>(maxLength: 50, nullable: true),
                    IsEmailConfirmed = table.Column<bool>(nullable: false),
                    Avatar = table.Column<string>(maxLength: 256, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_User", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "User");
        }
    }
}
